﻿using System;
using System.Text;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Alfa.Units.Fakes;
using Alfa.Units;

namespace Alfa.Zproject.Test.Units {
	/// <summary>
	/// Summary description for UnitTestTemperature
	/// </summary>
	[TestClass]
	public class UnitTestTemperature {
		public UnitTestTemperature( ) { }

		#region Additional test attributes
		//
		// You can use the following additional attributes as you write your tests:
		//
		// Use ClassInitialize to run code before running the first test in the class
		// [ClassInitialize()]
		// public static void MyClassInitialize(TestContext testContext) { }
		//
		// Use ClassCleanup to run code after all tests in a class have run
		// [ClassCleanup()]
		// public static void MyClassCleanup() { }
		//
		// <summary>
		// Use TestInitialize to run code before running each test
		// </summary>
		//[TestInitialize( )]
		//public void MyTestInitialize( ) { }
		//
		// <summary>
		// Use TestCleanup to run code after each test has run
		// </summary>
		//[TestCleanup( )]
		//public void MyTestCleanup( ) { }
		#endregion

		[TestMethod]
		public void Convert_Celsius_Fahrenheit( ) {
			var source = new Celsius(23.4m);
			var destinantion = (Fahrenheit)source;

			Assert.AreEqual(source, (Celsius)destinantion);
		}

		[TestMethod]
		public void Convert_Celsius_Kelvin( ) {
			var source = new Celsius(23.4m);
			var destinantion = (Kelvin)source;

			Assert.AreEqual(source, (Celsius)destinantion);
		}

		[TestMethod]
		public void Convert_Celsius_Rankine( ) {
			var source = new Celsius(23.4m);
			var destinantion = (Rankine)source;

			Assert.AreEqual(source, (Celsius)destinantion);
		}

		[TestMethod]
		public void Convert_Fahrenheit_Kelvin( ) {
			var source = new Fahrenheit(23.4m);
			var destinantion = (Kelvin)source;

			Assert.AreEqual(source, (Fahrenheit)destinantion);
		}

		[TestMethod]
		public void Convert_Fahrenheit_Rankine( ) {
			var source = new Fahrenheit(23.4m);
			var destinantion = (Rankine)source;

			Assert.AreEqual(source, (Fahrenheit)destinantion);
		}

		[TestMethod]
		public void Convert_Kelvin_Renkine( ) {
			var source = new Kelvin(23.4m);
			var destinantion = (Rankine)source;

			Assert.AreEqual(source, (Kelvin)destinantion);
		}
	}
}
